fixed lock around file i/o operation that did not need to be locked. this removes a potential deadlock on android where i/o is considerably slower to physical storage.