Update server.py: add handler for SYNC