finish error logging