added global variable to main to get file name