better comments. more rigid directory checking