Readline instead of bit by bit