log instead of writing to document