fixing IOException