Add logging, rename write_new_changelog, update tests