add log and scheduler
add time limit
add external flag