Fixed the log on error.