--	added datahandler to handle file output writing