better hadoop simulation

add an equivalent of the OutputFormat
make prepare_input.sh more generic