Bug fixes for io errors and logging errors.
Added thread locking for device read/write and database inserts of measurements and messages.
Added warnings and errors web pages.