Regenerate basename before processing