fix error message and user File.extname