Fix to not continiously create file pointers.