minor bug fix with fprintf
changed frequency shift implementation slightly