fixed logging and a wiring issue