Added def for get_valid_filename