Added logging using log4j and minor fix