Update file.pp

added array checks