Added timeouts when writing device files

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