[minor] encode filename to utf-8 and filepath before saving