changed append to lazy write in lan.hs