Replace flag in different file formats