Solved problem with getopt