ensure query string is captured in the record entry

Modifications to ensure query string portion of the URL is captured in the database by the Writer middleware.