seg-fault on larger files
clean up