*: print out configuration when necessary
Merge pull request #1704 from xiang90/print_config

*: print out configuration when necessary