added function to add file