Improve logging, make logging level a parameter