Save phi parameter to output file when needed