Made minor change, save instead of savetxt to improve speed