Record error message if job is failed