Added logging of requests & responses. Fixed swapped params