Fixed new file instances created every time