Added support for test mode (-t) and improved usage info