@Loh Jane,
Yes, you used 'beforehand' appropriately and it is not awkward to the ear.
But you don't have to take my word for it since I'm not an english teacher, per se, so we'll just wait till some 'english teacher' bothers to agree with me.
As to the poster above me, I don't know what the hell the person is going on about.