created default exception handler to log errors