fix SDK build dependencies, access files only after they have been created