Added Directory loading code