added function to delete expired files