Javascript Error Catcher and Event Logger Application