changed format to be clearer
added a generic error condition for logging