Fixed a syntax error in exception handler of BtSyncApi that caused a cascade of exceptions preventing application shutdown