Timer built. Exit statement implemented for timer count and file close.