Improve logging setup