Added default error and exception handler.