main.R amendments to log for 30 days
expand and bugfix