patched cleanup logic for dot-files, also debugging potential dot-files
bugs