How to avoid paying too much when you refinance your mortgage