prevented errors when cancelling file dialog