Made error to be printed in browser javascript log