The renameTo method was failing under Windows.  Deleting the destination file before the rename fixes the issue.