file output was broken, root path is defined in global var