removes extra fprintf and runs octave function after printing headers