Don't pull out this method, put the code after the if/else. Use a non-block `cd`.