Minor bug fixes for file name ext