Read from and write to a file

Signed-off-by: Diyan Yordanov <diyordan@cisco.com>