Improved error checking and prettier for Windows.