we generally don't put newlines in exception messages. you also don't need to explicitly coerce to  a string:

```
raise UserDataError("Failed to read file: %s" % err)
```

or even (new style string formatting)
```
raise UserDataError("Failed to read file: {}".format(err))
```