use kattio in place of some i/o operations