add missing exception handling