Change to record the error log