now command line parameter is used for file path, some minor changes