adding logging for requests and errors