fixed writeTrough readTrough logic

Change-Id: I6613c70a72503b1e6f00f1ddb20f23df4a8964ac