Added logging of requests and responses