Functions for assigning filename.