[BUGFIX] Processed files get corrupted when regenerated