allow command line args to work with array (previously only the last file was parsed)