Change the check and scripts functions to return results