Now it writes the file