fix command line tool throwing exception