correct filename problem and remove file correctly
add delete function