Record prompt errors to a log file.