fixing errors when dealing with additional amiconfig/cloudinit containing a write_files already #294