Write files with device name