moved file read to function;
ignored values as long as not all devices are running;
code cleanup