Add logs
add checking the result code