added option to define log level