Added a startup variable when calling __initialize__

__initialize__ is now executed on command reloading. The startup
variable will be True when the function is on starting up, False when it
is called from the reload command.
Improved error catching for exceptions

Errors in the read/write threads will now be written to the
exception.txt. Full stack traces will be added later if necessary.