Use for ... else construct for error handler as well