Add some checks and error handling. Update README.
Version bump to 1.3