Syntax errors

Moved the else inside the try so that the try-else construction will work properly. Straightforward stuff.