added existing file check in windows registrar (get rid of FileNoFound error)
added remove old file before rename windows registrar (get rid of FileAlreadyExists error)
changed to explicit file close in writeRegistry() because 'defer' wont be exected before rotation methods called and it blocks file