Add yield for large files

Fixes problems where files get corrupted due to os terminating program from not yielding..

Also added nice ticking period for the yield.