Enhanced python robustness

needed this to make flashi actually work and added some common error messages