append file information to files array in maincontroller