Improve the error message when an element cannot be found to bind an event listener