fixed compile error due to missing source file
fixed segfault when initialising directory