Made sure files is an array