adds routes and fixes query_log