Removed dynamic_cast when opening a file using a plugin