Generalize write dig function