Improve error logging in AJAX & increase timeout