Added ts_printf, and unit test