fixed subtle bug causing new line at beginning of recorded data