refactor get reader,let it is easy to get different config for different env.
extract interface for factory
close reader after get monitor
get reader from system env
move runner to other pakage