Changed backed to c++11
Fixed chdir bug