modify error for Method because of wrong find and replace operation