handle file names on command line. Added unit testing