mode use 0644 for file, 0755 for dir