Script modifications for debugging