some cleanup and take filepaths from commandline along with numberOfnodes