Improved system i/o functions.