[fix] Avoid conflicts when a directory doc has already been created