Pulmonary function test and bronchoscopy