Improve Error Logging, Correct Flaws in Arduino Code