add more logging for diagnostics