Updated the main method and added some log4j output