changed basename to path