* make error logging NULL safe.