added rescan-dir function