Improved logging, and fixed configuration