After you file

When the bank rejects the direct deposit the refund is sent back to the IRS.  The IRS then mails a refund check to the address on the tax return.