Structure of minimal console application that works at background