fixed the file path problem caused by -d(daemon)