args_write now returns the number of files written