added delay to make sure the check happens after the command starting to run