should be in 'rw+' to truncate