Change writing in different file formats