Write the console application