add error.log and fix nest directory create bug