improved reaction time to 0.2 seconds and improved loggng. LED now stays off at completion of the script.