Fixed typo. Added new line after exception messages. Added try/catch to complete example.