add general exception guard