Fix logging - fixes #50