Change logic to detect grunt task