- add new working sample
- error handling in c code