move filename to global variable