Added error handing to donate.js