Fixed arguments bug under windows

Also directed the output to the console, to make problems easier to diagnose.