Fixed logs not being uploaded on exit