more I/O fixes