change logfilesize check to ondemand