Try to move a file to a known directory if it is locked

One downside is that this loses the original file name, which may hurt diagnostic in some cases. Maybe keep original file name and add token to it?