fix up logic and file delete paths
fix up logic and file delete paths