add more logging for better diagnostics