added error messages and logging, added stop on gm chat