Adding more logging for debugging.