add option parser and try except