fix app init in stand-alone mode
restruct files