adding path module to check file extension name