Added Log4J and added some debugs and warns.