made --account a parameter, with env var backup; better exit logic