modified writeTo*** methods
build
Change file name
Fixed call stack
update comments
Add sample