1. add source reader related messages; 2. tidy up code