properly wait for promises before writing target
properly wait for promises before writing target

switchinnovations/pxt,Microsoft/pxt,playi/pxt,Microsoft/pxt,Microsoft/pxt,switch-education/pxt,switch-education/pxt,Microsoft/pxt,playi/pxt,playi/pxt,switchinnovations/pxt,switchinnovations/pxt,switch-education/pxt,switch-education/pxt,playi/pxt,switchinnovations/pxt,Microsoft/pxt,switch-education/pxt