Improve logging in pipeline handlers