Refactor log washing