After you file

The bank will reject the direct deposit since the account is closed.  The federal tax refund is sent back to the IRS.  The IRS will send you a refund check in the mail to the address you entered on your tax return.