Changed the error,to continue on scan error.

 Changed the error function which was provided as on windows it was getting error.
and we were stopping scanning in between.