fixed bugs with serial and added C program to reset USB devices