built file and fill the contents