add option handling
use finaliser
parameterise on output stream
get package lookup out of finaliser
add stdout / fix option handling