Find file path and act on it one after the other to avoid race condition