Improve reader and writer