Changed parsing of cmd line arguments from for loop to use getopt::long instead. This requires use of --user to specify a username.