Fixed closing FileOutputStream before deletion (wouldn't work or else). This also solved the rename file (can't rename to a file that exists).
Cancel now only works if the file backed up properly