allow file name to be passed as parameter