add log
guard against SecurityError