exit when run from command line