adding check to make sure the visit has started
fixing phpcs error
Merge pull request #825 from rathisekaran/script_improv

adding check to make sure the visit has started