Various tweaks and catch IO exceptions.
Sample config file for MBI.
General tidyup and documentation.