script for checking that process is done