Added some meap-style eror catching

Haven't tested it *too* much, but it should be good. It seems to work,
anyway