Add failure callbacks, handle base64 with onload