Added logging in the wait for response section.