added error checking to some more funcs.
will need a crapload of testing to even boot.