Add delete function and fix path directory