Heavy element abundances and massive star formation