Leliana or Zevran are in the party who will quickly uncover him as a spy.
Upon further investigation, the Warden will be told that the elf is waiting for his brother however since Berwick is very stressed by now, he can be persuaded or intimidated (Improved Coercion is required) to reveal that he was sent to spy on the castle by "a tall man" working for Arl Rendon Howe who was Teyrn Loghain's right hand. However he only managed to send word to his employers that the Arl is sick because afterwards the monsters came out of the castle and was stuck.
Regardless of how he is exposed, the Warden receives Berwick's letter (unless it was obtained before) and then there are several options that can be followed:
The elf can be told to leave the village.
Berwick can be forced into helping defend the village. Doing so will make Sten say "Fitting" and gain (+2) . However, Oghren disapproves (-5) unless a persuasion check is successful but if the Warden is persuaded by Oghren that Berwick should be killed Oghren approves (+4) .