* added reading from stdin if no paths are provided * using streams to encapsulate common behaviour in print_from_stream