Began to write main file