Server logging and error handling mechanism