While 'component_properties_text'
correctly accumulated properties from all processed components, each
iteration of the loop was overwriting the entire file content.
Move the file(WRITE ...) call outside the loop to ensure all accumulated
component properties are written once, preserving information for all
components.