Split ifo writing to separate method