Update lag_custom.sh

Minor cleanups and timestamping.