Add message to the log in case of error