Init global variable in "write" instead of "load" API method