Auto substitution a file extention accordingly the dev chunk option

I think this changes will help users to avoid some issues.