Refactorings of the request/respones file logging code