if (-M $outputfile < $timeforfiletoupdate_beforeerror) { # etc }