added support for .csv ending instead of only .txt