Use console logging instead of alerts for exceptions, resolves #3