check for error on sync - fixes #34

https://github.com/CruGlobal/mpdx/commit/f68a0d86c8cfd1aea4e53572c97428eaae04edb0#commitcomment-2455295
make sure dialogs are good and closed before opening new ones - fixes #43 (I think)