Some more error checking, add a schema install script