Fix write log file used wrong folder path