Created two new methods that determined whether the extension of a file is a csv or txt. Calls appropiate function based on result.