added option to log each request