Deleting related log when deleting an instance. Add index to logs
Signed-off-by: JohnMave126 <johnmave126@gmail.com>