use .tmp instead of tmp