*np* maybe move the close into the success handler (so that the window does not close until things work.