cleaned up logging, better usage output, prevent segfault when argc is less than 2