I don't think the basename logic should be in this method. This method should just take the input exactly as given. I think the basename logic should be handled in the constructor.