Added IOException handlers to some functions (necessary for
CommitClass.java)