Improve protect logging. Closes #1884