exit shortcut; logging/error handling added