Added error checking to the script. Added a script that did things via ctypes.