Fix multiple file opening