Introduced margin so that one can specify when a shutdown should be done. Default is still 60 min