adding log4j, completing reading from config and command line