fix compile errors and remove log4j impl for logging