Check if tape_id exists in db
misc fixes