finished getopt need file io