fixed eval string generation
log eval string
add shutdown hook because of Java's terrible signal handling
run matlab in headless mode