updating examples
adding new error checking and updating readme