Some fixes

Error message is not same between unix and windows.