Replace all tabs by spaces
Add a check for the parameter of openDevice
Refactoring and commenting of getPath.
It fixes error messages while trying to access wrong paths
Fix error messages in case of wrong device name
It was due to a too early check of !device
Add a missing error() to stat