fix closing if file could not be read
add limit on chip cycles per second