added option to log requests