Improve Input/Output abstraction