added existsFile function to csvwriter