Cleanup the logging statement use Errorln for error and V(3) for the debug statements