improved water-demo error handling

The water-demo program now properly handles
errors and will return an appropriate error
status.