use original filename as base for tmp filename