Added log4j to create a logfile.