changed server config to include logging and error handling