add validation and roll back feature

1. add large file seg_head validation check
2. roll back write when write failed or client abort