while the dog slept ...
Avoid using while to mean though or whereas when
there is a danger of ambiguity:
Incorrect: While most Canadians speak
English, the Quebecois speak French
Write: Though most Canadians ...
Do not confuse the adverb awhile with the noun phrase a while:
awhile: adverb—We stood awhile on the dock; awhile back.
a while: article and noun—We stood for a while on the dock; a while ago; wait a while.
Note: not whilst