fix warnings when dir is unreadable