Better detect application entry-point