Added exception handling for reading copybeans.