new option for "stat" to write to a file