tracking down directory exists problem