Changing line endings

git was most insistent that this needed committing.
Startup error handling

Tries to catch and throw errors better, and print more
diagnostic info on failure