Add onerror event

This PR make changes to the call to mete window function in case the icon image is not found.

It also make changes to sql schema.

Sorry for the big mess....