Refined sensor reading process.
Added config file support.