make exception handling more specific