[task] Add WriteOffMain function