file reader and writer + console