Adding b64 error detection to prevent bad strings being saved