fixed command line tool, works like a champ now