More robust command line interface