getFileName() was generating random fileNames each call