Fixed bug in FileGenerator