catch more exceptions and react gracefully