Replace useless file writing methods by equivalent from FilesManager
Fix output folder variable name