Using function from common lib to init/close app