added getlastline function, added timestamp and longterm logging for publicip, added rotater for publicip