Main server loop file