I think that this line could be outside the if statement, because I think the return code should be checked always.