extract filename dynamicly