better error management on device creation
Merge pull request #98 from frankrousseau/master

better error management on device creation