Added magic file generation