Fix LOG parsing issues if a folder structure is uploaded to SFTP. Unset vars on exit.