Update

- error output / handling
- specify an output directory
- load credentials from file
- lock tables
- minor changes