Add onload and onerror