restoring base_name to locals() from 3312ed5733043d3a52d5de270a53174d9d6e8fdf