added function to access files