Returning changed filename to be used later in script