workign fs write
clear file and apend