Lagtime check

For issue #358