generates excutable main file