Fixed logging errors