Abstract root path to variable, add ASCII encoding to save (probably the wrong long-term solution)