parent path based on relative path causes error. fixed by using abs path in this case