added decoding into base64 with alternative if something goes wrong