predict tab filename and error on duplicate, fixes #3250