bugfix: remove invalid file and its parent