added fprintf for jvariables - might be wrong place, not sure yet