updated handling of exceptions when loading csv