Close and back conditional based on opts