Replaced some throws to throwIOs where the type is IO