Sorted out how to deal with graceful previous directory exits