adding more logging to debug awkward errors