Whats the best methodology for checking the whether the user is using the required file format? Is it just a matter of reading the char array and stopping on the '.' then reading the following characters till '\n' and then comparing whats extracted ?