Further tweaks for input/output variable writing