Better handling of exceptions when probing a file