generic line buffering tool that can be used for about anything that is linebased and needs buffering