Added code for background task in win8