write checking