Updated error checking

Now checks for errors in the initial input angles