build: move main file to the end of the file list