fixed crawler for directories and files