fixed duplicate handler calls in sync server path, added more logging and tests