added delete function to the file manager class