Fix directory not found exception