The first two are correct except that you should not put a space before a full stop. (You also should not put a space before a question mark.)
The last sentence may be acceptable but requires context to supply the answer to the question "before what?". It does not mean "a few minutes ago". It may be better to say "earlier" rather than "before", and to change "I thought" to "I had thought"