add pathToFile
minor changes