Put USB error checking in all functions