updated device.pp to ensure all file types are tested before truncate