logging middleware didn't work how i thought