Moved base writer code

Base class is now abstract using abc.

Change-Id: I9c7ced18afe4c37fda427296c1054202a66b9141