added log4j, fixed some bags
fixed some bags