extracted reader and writer classes,added yaml config