mucking about with io in terminal