Flush app registry before releasing file lock