Created getFileExtension method