Ensure temp filehandle is closed before rename
v0.03

            Close temp filehandle for better Windows compatibility