Code to check running progress