update to support browsers which does not support 'console' variable