Added warnings and tidied

Script should now crash more gracefully.

As there are multiple threads, raising an exception causes one thread to crash, but not the entire program. Standard is now to raise a warning, not an exception. If run in verbose (debug) mode, the exception will still be raised.

Signed-off-by: Danny Price <dan@thetelegraphic.com>