log4j config added
refactor code