slap one template at the end for the case of tiny splits
passed write.size to the wrong call
avoid deprecation warning
 can't overwrite tmp, so remove each time
too much information