Detecting whether gkey or csv file provided