file delete cleanup

remove related data records when removing a file