fix(run_cmd): truncate file on wr method

To be consistent with '>' semantic