If reference filename isn't None, basename is silently ignored - any thoughts on ways around that?