python write json lines file