added createcontext + migratecontext + [sg]etflags files