another take on inclusion of errorhandler in CLI scripts