Added basepath support for writers

Change-Id: I2b5d70c05d194206cff96409d3b1336dda518730