In the martial arts community we call this "praise, correct, praise."
By being polite you're ensuring that the message you're sending gets incorporated into their strategy for tackling that problem and making them feel comfortable discussing other issues with you.
As programmers, we have to learn that 'programming' people is very different from programming computers.
That's great! To make it read files faster, next time let's try xyz.