read thread will terminate on program end, control char detection implemented