You cannot write a check from a HELOC to cover closing costs on a new home. Since you're selling the old home and the HELOC will be paid off, you won't be able to write any checks against it.