safety functions to protect system failures etc