Cleanup, better error messages & exiting