Refactor observeStream to handle different async running mode
Implement byteToCharStream and charToLineStream.