couple of small changes to IO and diag