Big try/catch to deal with buffer errors.