Added Polling Method and Write to file for the polling data