changed alert for Ajax errors to use console.log