ensure files is an array