Fixed bug where error appears if dir not there