increased safety and readability

-closing on error is now safer
-the gui is now helpful and tells you what to do