Added log directory to fix some bugs