Changed to accept any file extension input by the user