Add critical error flag support to client.py