Fixed a bug where multi string or picture files would be written as the first given file