Command line script improvements