Prevent errors before 'error' handler is set