Improve IO part of standard library