Support save to directory