file reading and writing

Signed-off-by: jsinclair <james@mytcg.net>