Fixed writes to lastmonth file