Lock tempfiles