added some new error handling

Signed-off-by: DarkSnake-Kobra <jbttoms@gmail.com>