added log4j error logging and exception handling