speed up saving to file by using numpy function .savetxt