Fixing run time exception thrown as a warn log