Added logging of internal server errors