Files are being generated but with the wrong name, and not with the content, please see my comment