Initialize working directories and files