read file is now closed ASAP