fixed temp file name bug