Add error catching of disk io