add debug log on open dir/file and save