Rename test func
Fix rec command builder
Extract line reading into util func