Nicer I/O handling.