Added log4j shutdown handler to force flusing the buffers on normal jvm exit