write to file and chart basiclly ok