Improve fatal error handler to catch all errors that can't be handled by standard error_handler