Fill in the blank with the most appropriate option.
If only ______________, this wouldn't have happened.
We use if only + past perfect to talk about a wish to change something that has already happened. The verb in the conditional clause (which follows the 'if only' clause) may be in the simple form or the continuous form, depending on the meaning.
Thus, option D "we had been careful" is correct.
Option A is incorrect as “have been careful” refers to present perfect, whereas
the context refers to a hypothetical situation in the past which is continuing.
Thus, past perfect continuous is the correct choice and not the present perfect
continuous.
Option B is incorrect as use of “had we been careful” would render “if only”
useless and grammatically incorrect.
Option C refers to “we were not careful” and this does not concur with the
sentence structure at all.
Thus, option D is the correct answer.