Assert in separate function