added basic dir scanner
improved dirscan performance and error handling