The license_file may appear empty during the license plugin
verification because the write() operation buffers the data
in memory and does not immediately write it to disk.
Calling flush() explicitly ensures that the content is
written to disk immediately.
Test Plan
PASS: verify the license check passes with no empty file error
Closes-bug: 2093343
Signed-off-by: Fabiano Correa Mercer <fabiano.correamercer@windriver.com>
Change-Id: Ibf5e04b1516ce789812e09a50689ec268cd06e4d