Determine new filename if needed