passing file name as parameter