adding platego support and porting basename accross