implement createTemporary with extension parameter