Minor reorder code (-sql parameter)