Fixed not used generateFilename