Increase logging in error case in valve.
Cleanup code style.