Add another try catch, so we close the window regardless.