initial stab at exception handling around file operations