matrix i/o exception handling