You doesn't process case when client gets only quotes within a minute and no trades. You lose stock name and create file <nothing>.dat