Adding serial output for debugging.