If the check is still in your hands, take it back to the bank and have them undo the transaction. If you can't get the check back from the closing agent, you may not be able to stop payment. That's why title agents get certified funds, so the check is good and can't be stopped. Call your bank and they can advise you.
Now, if the closing agent has deposited the funds and the deal falls thru and they refuse to return your money, contact the title underwriter listed on your title commitment or contact the state insurance department.