back to mingw and add few error handling

project back to mingw and add error handling with try catch mechanism
with messagebox to show the error