not writing to file when not using cache

Change-Id: I801d814866a10167339a07d8bff472034c33ba18