Tweaking writes to the device files

Signed-off-by: Samuel Stirtzel <s.stirtzel@googlemail.com>