Added command line options and save to file