Added function to write nse file from timestamp array