close safely
remove sync_client code
cleanup