log error in error.log file