Handling of multiple open files