FPS control and closing application