fixed csv
added a way to stop execution