Add check output_path is not None