read & write from/to file

Signed-off-by: Aleksey Snisar <saiuz2000@gmail.com>