Changed some IO calls