added throws for IOException to several methods