reader/writer: refactor configuration